//
//  ViewController.m
//  DesignMode
//
//  Created by wzp on 2024/8/29.
//

#import "ViewController.h"
#import "ZYComponentLoader.h"
#import "IComponentProtocol.h"

@interface ViewController ()
@property (nonatomic, strong, nullable) ZYComponentLoader *loader;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.loader = [[ZYComponentLoader alloc] initWithRootView:self.view];
    [self.loader doLoadAllComponent];
    
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(10 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        id<IComponent>userListComponent = [self.loader.rootComponent findForComponentId:@"onLineList"];
        [self.loader.rootComponent removeComponent:userListComponent];
    });
}


@end
